﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using OrderIT.Model;

namespace OrderIT.WinGUI
{
    public partial class Main : Form
    {
        public Main()
        {
            InitializeComponent();
        }

        private void btnGo_Click(object sender, EventArgs e)
        {
            using (OrderITEntities ctx = new OrderITEntities())
            {
                var cities = new[] { "New York", "Seattle" };
                //var list = from o in ctx.Order
                //           where cities.Contains(o.ShippingAddress.City)
                //           select o;
                var list = (from o in ctx.Order
                            where o.OrderDetail.All(d => d.Discount == 0)
                            select o).Skip(10).Take(10);

                var key = new EntityKey("OrderITEntities.Order", "OrderID", 1);
            }
        }
    }
}
